
import React from 'react';
import { Row, Col } from 'antd';
export default class DialogTitle extends React.Component<any, any> {
    render() {
        const { title, icon, iconBgcolor, hideIcon = false } = this.props;
        return (
            <Row>
                <Col span={22} style={{ paddingLeft: 20, lineHeight: '48px' }}>
                    <div>
                        {
                            !hideIcon &&
                            <div className="wea-browser-single-icon-circle" style={{ background: iconBgcolor }}>
                                <i className={icon} />
                            </div>
                        }
                        <span style={{ verticalAlign: 'middle' }}>{title}</span>
                    </div>
                </Col>
            </Row>
        );
    }
}

export const getDialogTitle = (title, icon = 'icon-coms-ModelingEngine', iconBgcolor = "#96358a") => {
    return (
        <DialogTitle title={title} icon={icon} iconBgcolor={iconBgcolor} />
    )
}